<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>系统公告</title>
<%@ include file="../../common_header.jsp"%>
<script type="text/javascript">
		//所有的子窗体都需要有一个save函数，当点击弹出窗体的保存按钮时所进行的操作
		function btnSave_click() {
				var fun_ret;
				var vals = $('#formModule').serialize();
				var url = '${saveUrl}';
				$.ajax({
					async : false,
					type : "POST",
					url : url,
					data : vals,
					cache : false,
					dataType : 'json',
					success : function(data) {
						if (data.success != 0) {
							//top.Ext.Msg.alert("提示",data.msg);
							Ext.Msg.alert("提示", data.msg);
						} else {
							fun_ret = true;
						}
					}
				});
		return fun_ret;
		}
		 $(document).ready(function(){
			//获取当前用户可查看到的部门
			showDataInCombotree('${ctx }/manage/sysDepartment/getAllDepaetment?flag=0',$("#depId"),'${model.sysDepartment.depId}');
		  });
		 
		</script>
		</head>
		<body>
		<div style="padding: 1px" align="center">
			<form id="formModule" method="post">
				<table border="0">
					<tr height="0">
						<td><c:if test="${!empty model.id }"><input type="hidden" value="${model.id }" name="id"></input></c:if></td>
					</tr>
					<tr height="30">
						<td>所属单位：</td>
		                <td><select id="depId" name="sysDepartment.depId" class="easyui-combotree" style="width:180px;height:25px" data-options="required:true,editable:false"></select>
		                </td>
					</tr>
					<tr height="30">
						<td>标题：</td>
						<td><input id="TITLE" maxlength="10" placeholder="请输入公告标题"
							class="easyui-validatebox textbox" type="text"
							name="title" data-options="required:true"
							style="width: 180px;height: 25px" value="${model.title }"></input></td>
					</tr>
					<tr height="30">
						<td>内容：</td>
						<td><textarea id="desction" rows="4" cols="25" style="width:180px;" name="content">${model.content }</textarea></td>
					</tr>
					<tr height="30">
						<td>公告类型：</td>
						<td><select id="NOTICE_TYPE" name="noticeType">
								<option value="0" <c:if test="${model.noticeType==0 }">selected</c:if>>资讯</option>
								<option value="1" <c:if test="${model.noticeType==1 }">selected</c:if>>指南</option>
						</select></td>	
					</tr>
					<tr height="30">
						<td>状态：</td>
						<td><select id="status" name="status">
								<option value="9" <c:if test="${model.status==9 }">selected</c:if>>已推送</option>
								<option value="1" <c:if test="${model.status==1 }">selected</c:if>>未推送</option>
						</select></td>
					</tr>
				</table>
			</form>
		</div>
</body>
</html>